#@web_layout?()
#define css()
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/layer.css?#(getUUID)" />
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/index.css?#(getUUID)" />
#end
#define content()
<div class="c-login c-login-back aui-content" style="padding-top:9%;">
  <div class="g-panel">
    <div class="m-title" style="width:300px;height:50px;background:none;text-align: center;color: #fff;font-size:30px;font-weight: 700">后台运营管理系统</div>
    <div class="m-box">
      <div class="u-field">
        <div class="u-field-icon f-icon-phone"></div>
        <input type="text" name="username" id="username" class="u-field-input" placeholder="请输入用户帐号" maxlength="11"/>
      </div>
      <div class="u-field">
        <div class="u-field-icon f-icon-password"></div>
        <input type="password" name="userpass" id="userpass" class="u-field-input" placeholder="请输入密码" maxlength="32"/>
      </div>
      <div style="margin-top:30px;" class="u-btn" onclick="login(this)">
        <div class="u-btn-login" ></div>
      </div>
    </div>
  </div>
</div>
#end
#define script()
<script type="text/javascript">
    var ctx="#(contextPath)";
</script>
<script type="text/javascript" src="#(contextPath)/assets/admin/js/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="#(contextPath)/assets/admin/css/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="#(contextPath)/assets/admin/js/mylib/ajax.js"></script>
<script type="text/javascript" src="#(contextPath)/assets/admin/js/layer/2.1/layer.js"></script>
<script type="text/javascript" src="#(contextPath)/assets/admin/js/laypage/1.2/laypage.js"></script>

<script>
    if(top != self){
        top.location.href = "#(contextPath)/admin/login";
    }
</script>

<script>
    function login(){
        var config = {
            "url":"#(contextPath)/admin/doLogin/",
            "method":"POST",
            "tips":"您即将进入后台管理系统，是否继续",
            data:{"username":$("#username").val(),"userpass":$("#userpass").val()}
        };
        var backendTool = new BackendTool(config);
        backendTool.successCallBack=function(data){
            if(data.result){
                location.href="#(contextPath)/admin/";
            }else{
                layer.alert(data.msg)
            }
        }
        backendTool.ajaxRequest();
    }
</script>
#end